package com.aspose.cells;

import java.util.ArrayList;

class zare {
   private zcfw a;
   private zapy b;
   private WorksheetCollection c;
   private zast d;
   private String e;
   private String f;
   private String g;
   private String h;
   private String i;
   private boolean j;
   private com.aspose.cells.b.a.g.a.ze k = new com.aspose.cells.b.a.g.a.ze("(\\d|[a-z|A-Z])+");
   private boolean l = false;
   private boolean m = false;
   private static final com.aspose.cells.b.c.a.za n = new com.aspose.cells.b.c.a.za(new String[]{"text-style", "number-style", "currency-style", "date-style", "time-style", "percentage-style", "default-style", "style", "fill-image", "name", "truncate-on-overflow", "text", "text-properties", "number", "fraction", "scientific-number", "text-content", "hours", "minutes", "seconds", "month", "year", "day", "day-of-week", "am-pm", "currency-symbol", "map", "condition", "apply-style-name", "textual", "color", "min-integer-digits", "decimal-places", "min-exponent-digits", "min-numerator-digits", "min-denominator-digits", "grouping", "family", "parent-style-name", "master-page-name", "data-style-name", "table-column", "table-row", "table", "table-cell", "paragraph", "graphic", "href", "show", "actuate", "table-properties", "display", "writing-mode", "table-cell-properties", "paragraph-properties", "table-column-properties", "column-width", "table-row-properties", "row-height", "use-optimal-row-height", "break-before", "auto", "column", "page", "graphic-properties", "wrap-option", "padding-top", "padding-bottom", "padding-left", "padding-right", "textarea-vertical-align", "textarea-horizontal-align", "fill", "fill-color", "opacity", "fill-image-name", "repeat", "stroke", "stroke-width", "stroke-color", "stroke-opacity", "auto-grow-width", "auto-grow-height", "text-align", "margin-left", "start", "end", "center", "justify", "use-window-font-color", "font-name", "font-weight", "font-style", "text-line-through-style", "font-size", "text-underline-style", "text-underline-type", "text-position", "border", "border-left", "border-right", "border-top", "border-bottom", "diagonal-bl-tr", "diagonal-tl-br", "rotation-angle", "direction", "shrink-to-fit", "vertical-align", "repeat-content", "background-color", "cell-protect", "top", "automatic", "bottom", "baseline", "middle", "transparent", "protected formula-hidden", "formula-hidden protected", "none", "formula-hidden", "protected", "double", "thin", "thick", "medium", "hair"});

   zare(zapy var1, boolean var2) {
      this.b = var1;
      this.d = var1.b.getWorksheets().m();
      this.j = var2;
      this.c = var1.b.getWorksheets();
   }

   void a(zcfw var1) throws Exception {
      this.a = var1;
      if (var1.n()) {
         var1.a();
      } else {
         var1.d();

         while(zass.a(var1)) {
            switch(n.a(var1.p().toLowerCase())) {
            case 0:
            case 1:
            case 2:
            case 3:
            case 4:
            case 5:
               this.a();
               break;
            default:
               var1.a();
            }
         }

      }
   }

   void b(zcfw var1) throws Exception {
      this.a = var1;
      if (var1.n()) {
         var1.a();
      } else {
         var1.d();

         while(zass.a(var1)) {
            switch(n.a(var1.p().toLowerCase())) {
            case 6:
               this.b();
               break;
            case 7:
               this.c();
               break;
            case 8:
               this.d();
               break;
            default:
               var1.a();
            }
         }

      }
   }

   void c(zcfw var1) throws Exception {
      this.a = var1;
      if (var1.n()) {
         var1.a();
      } else {
         var1.d();

         while(zass.a(var1)) {
            switch(n.a(var1.p().toLowerCase())) {
            case 0:
            case 1:
            case 2:
            case 3:
            case 4:
            case 5:
               this.a();
               break;
            case 6:
               this.b();
               break;
            case 7:
               this.c();
               break;
            case 8:
               this.d();
               break;
            default:
               var1.a();
            }
         }

      }
   }

   private void a() throws Exception {
      String var1 = null;
      boolean var2 = true;
      if (this.a.m()) {
         while(true) {
            if (!this.a.l()) {
               this.a.k();
               break;
            }

            switch(n.a(this.a.p().toLowerCase())) {
            case 9:
               var1 = this.a.s();
               break;
            case 10:
               var2 = "true".equals(this.a.s().toLowerCase());
            }
         }
      }

      if (this.a.n()) {
         this.b.a(var1, "", (ArrayList)null);
         this.a.a();
      } else {
         StringBuilder var3 = new StringBuilder();
         this.l = false;
         ArrayList var4 = new ArrayList();
         this.a.d();

         while(zass.a(this.a)) {
            switch(n.a(this.a.p().toLowerCase())) {
            case 11:
               this.a.a(1);
               String var5 = this.a.i();
               this.a.a(0);
               if (var5 != null) {
                  if (this.k.d(var5)) {
                     var3.append('"');
                     var3.append(var5);
                     var3.append('"');
                  } else {
                     var3.append(var5);
                  }
               }
               break;
            case 12:
               this.a(var3);
               break;
            case 13:
            case 14:
               this.b(var3);
               break;
            case 15:
               this.b(var3);
               break;
            case 16:
               var3.append('@');
               this.a.a();
               break;
            case 17:
               if (!var2) {
                  var3.append("[h]");
                  this.a.a();
               } else {
                  this.a("h", var3);
               }
               break;
            case 18:
               this.a("m", var3);
               break;
            case 19:
               this.a("s", var3);
               break;
            case 20:
               this.a("m", var3);
               break;
            case 21:
               this.a("yy", var3);
               break;
            case 22:
               this.a("d", var3);
               break;
            case 23:
               var3.append("dddd");
               this.a.a();
               break;
            case 24:
               var3.append("AM/PM");
               this.a.a();
               break;
            case 25:
               if (this.a.n()) {
                  var3.append('$');
                  this.a.a();
               } else {
                  var3.append('"');
                  var3.append(this.a.i());
                  var3.append('"');
               }
               break;
            case 26:
               this.a(var4);
               break;
            default:
               this.a.a();
            }
         }

         if (var3.length() != 1 || var3.charAt(0) != '0' || this.l) {
            this.b.a(var1, com.aspose.cells.b.a.zr.a(var3), var4);
         }

      }
   }

   private void a(ArrayList var1) throws Exception {
      zard var2 = new zard();
      if (this.a.m()) {
         while(true) {
            if (!this.a.l()) {
               this.a.k();
               break;
            }

            switch(n.a(this.a.p().toLowerCase())) {
            case 27:
               var2.a = this.a.s();
               break;
            case 28:
               var2.b = this.a.s();
            }
         }
      }

      if (var2.a != null) {
         com.aspose.cells.b.a.a.ze.a(var1, (Object)var2);
      }

      this.a.a();
   }

   private void a(String var1, StringBuilder var2) throws Exception {
      var2.append(var1);
      if (this.a.m()) {
         while(true) {
            if (!this.a.l()) {
               this.a.k();
               break;
            }

            switch(n.a(this.a.p().toLowerCase())) {
            case 7:
               if ("long".equals(this.a.s().toLowerCase())) {
                  var2.append(var1);
               }
               break;
            case 29:
               var2.append(var1);
               var2.append(var1);
            }
         }
      }

      this.a.a();
   }

   private void a(StringBuilder var1) throws Exception {
      if (this.a.m()) {
         while(true) {
            if (!this.a.l()) {
               this.a.k();
               break;
            }

            switch(n.a(this.a.p().toLowerCase())) {
            case 30:
               String var2 = zaqh.g(this.a.s());
               if (var2 != null) {
                  var1.append('[');
                  var1.append(var2);
                  var1.append(']');
               }
            }
         }
      }

      this.a.a();
   }

   private void b(StringBuilder var1) throws Exception {
      boolean var2 = false;
      int var3 = -1;
      int var4 = 0;
      int var5 = -1;
      int var6 = -1;
      int var7 = -1;
      if (this.a.m()) {
         while(true) {
            if (!this.a.l()) {
               this.a.k();
               break;
            }

            switch(n.a(this.a.p().toLowerCase())) {
            case 31:
               var3 = (int)zaqh.k(this.a.s());
               break;
            case 32:
               this.l = true;
               var4 = (int)zaqh.k(this.a.s());
               break;
            case 33:
               var5 = (int)zaqh.k(this.a.s());
               break;
            case 34:
               var6 = (int)zaqh.k(this.a.s());
               break;
            case 35:
               var7 = (int)zaqh.k(this.a.s());
               break;
            case 36:
               var2 = "true".equals(this.a.s().toLowerCase());
            }
         }
      }

      this.a.a();
      int var8;
      if (var2) {
         var1.append("#,");
         if (var3 < 3) {
            for(var8 = 0; var8 < 3 - var3; ++var8) {
               var1.append('#');
            }
         }
      }

      if (var3 == 0) {
         if (!var2) {
            var1.append('#');
         }
      } else {
         for(var8 = 0; var8 < var3; ++var8) {
            var1.append('0');
         }
      }

      if (var4 != 0) {
         if (!var2 && var3 == -1) {
            var1.append('0');
         }

         var1.append('.');

         for(var8 = 0; var8 < var4; ++var8) {
            var1.append('0');
         }
      }

      if (var6 != -1 && var7 != -1) {
         for(var8 = 0; var8 < var6; ++var8) {
            var1.append('?');
         }

         var1.append('/');

         for(var8 = 0; var8 < var7; ++var8) {
            var1.append('?');
         }
      }

      if (var5 != -1) {
         var1.append("E+");

         for(var8 = 0; var8 < var5; ++var8) {
            var1.append('0');
         }
      }

   }

   private void b() throws Exception {
      this.a.a();
   }

   private void c() throws Exception {
      this.e = this.f = this.g = this.h = this.i = null;
      if (this.a.m()) {
         while(true) {
            if (!this.a.l()) {
               this.a.k();
               break;
            }

            switch(n.a(this.a.p().toLowerCase())) {
            case 9:
               this.f = this.a.s();
               break;
            case 37:
               this.e = this.a.s();
               break;
            case 38:
               this.h = this.a.s();
               break;
            case 39:
               this.g = this.a.s();
               break;
            case 40:
               this.i = this.a.s();
            }
         }
      }

      switch(n.a(this.e)) {
      case 11:
         this.i();
         break;
      case 41:
         this.g();
         break;
      case 42:
         this.h();
         break;
      case 43:
         this.e();
         break;
      case 44:
         this.f();
         break;
      case 45:
         this.j();
         break;
      case 46:
         this.k();
         break;
      default:
         this.a.a();
      }

   }

   private void d() throws Exception {
      zapv var1 = new zapv();
      if (this.a.m()) {
         while(true) {
            if (!this.a.l()) {
               this.a.k();
               break;
            }

            switch(n.a(this.a.p().toLowerCase())) {
            case 9:
               var1.a(this.a.s());
               break;
            case 47:
               var1.c(this.a.s());
               break;
            case 48:
               var1.a(zaqf.b(this.a.s()));
               break;
            case 49:
               var1.b(zaqf.c(this.a.s()));
            }
         }
      }

      if (var1.a() != null && this.b.j.get(var1.a()) == null) {
         this.b.j.put(var1.a(), var1);
      }

      this.a.a();
   }

   private void e() throws Exception {
      zaqe var1 = new zaqe();
      var1.a(this.f);
      var1.b(this.g);
      this.b.m.put(this.f, var1);
      if (this.a.n()) {
         this.a.a();
      } else {
         this.a.d();

         while(true) {
            while(zass.a(this.a)) {
               switch(n.a(this.a.p().toLowerCase())) {
               case 50:
                  if (this.a.m()) {
                     while(this.a.l()) {
                        switch(n.a(this.a.p().toLowerCase())) {
                        case 51:
                           var1.a("true".equals(this.a.s()));
                           break;
                        case 52:
                           var1.a(zaqf.a(this.a.s()));
                        }
                     }
                  }

                  this.a.a();
                  break;
               default:
                  this.a.a();
               }
            }

            return;
         }
      }
   }

   private void f() throws Exception {
      Style var1 = null;
      int var2 = 0;
      this.m = false;
      if ("default".equals(this.f.toLowerCase())) {
         var1 = this.b.b.getWorksheets().D();
         this.b.p = this.f;
      } else {
         var1 = new Style(this.b.b.getWorksheets());
         var1.copy(this.b.b.getWorksheets().D());
         if (this.j) {
            var1.setName(this.f);
            var1.a((byte)0);
            var1.a(false);
         }
      }

      if (this.h != null && this.b.c.get(this.h) != null) {
         var2 = (Integer)this.b.c.get(this.h);
         if (var2 < this.c.B().getCount()) {
            Style var3 = this.c.B().a(var2);
            var1.copy(var3);
            var1.a((byte)0);
            if (!this.j) {
               var1.a(true);
               var1.a(var2);
            }
         }
      }

      if (this.i != null && !"".equals(this.i)) {
         String var4 = this.b.a(this.i);
         var1.setCustom(var4);
      }

      if (!this.a.n()) {
         this.a.d();

         label67:
         while(true) {
            zaqs var5;
            label65:
            do {
               while(true) {
                  if (!zass.a(this.a)) {
                     break label67;
                  }

                  switch(n.a(this.a.p().toLowerCase())) {
                  case 12:
                     this.a(var1.getFont());
                     break;
                  case 53:
                     this.a(var1);
                     break;
                  case 54:
                     var5 = new zaqs();
                     var5.a = 5;
                     this.a(var5);
                     var1.setHorizontalAlignment(var5.a);
                     continue label65;
                  default:
                     this.a.a();
                  }
               }
            } while(var1.getHorizontalAlignment() != 7 && var1.getVerticalAlignment() != 8);

            var1.setIndentLevel(var5.b);
         }
      } else {
         this.a.a();
      }

      int var6 = 0;
      if ("default".equals(this.f.toLowerCase())) {
         this.c.b(var1);
      } else if (this.j) {
         if (var1.getName() != null) {
            var6 = this.c.B().e(var1);
         } else {
            this.c.B().d(var1);
            var6 = this.c.B().getCount() - 1;
         }
      } else {
         var6 = this.c.B().a(var1, var2);
      }

      if (this.b.c.get(this.f) != null) {
         this.b.c.put(this.f, var6);
      } else {
         this.b.c.put(this.f, var6);
      }

      this.m = false;
   }

   private void g() throws Exception {
      zaps var1 = new zaps();
      this.b.f.put(this.f, var1);
      if (this.a.n()) {
         this.a.a();
      } else {
         this.a.d();

         while(true) {
            while(zass.a(this.a)) {
               switch(n.a(this.a.p().toLowerCase())) {
               case 55:
                  if (this.a.m()) {
                     while(this.a.l()) {
                        switch(n.a(this.a.p().toLowerCase())) {
                        case 56:
                           var1.a(zaqh.d(this.b.a, this.a.s()));
                        }
                     }
                  }

                  this.a.a();
                  break;
               default:
                  this.a.a();
               }
            }

            return;
         }
      }
   }

   private void h() throws Exception {
      zaqd var1 = new zaqd();
      this.b.d.put(this.f, var1);
      if (this.a.n()) {
         this.a.a();
      } else {
         this.a.d();

         while(true) {
            while(zass.a(this.a)) {
               switch(n.a(this.a.p().toLowerCase())) {
               case 57:
                  if (this.a.m()) {
                     while(this.a.l()) {
                        switch(n.a(this.a.p().toLowerCase())) {
                        case 58:
                           var1.a(zaqh.d(this.b.a, this.a.s()));
                           break;
                        case 59:
                           var1.a("true".equals(this.a.s()));
                           break;
                        case 60:
                           switch(n.a(this.a.s())) {
                           case 61:
                              var1.a(0);
                              break;
                           case 62:
                              var1.a(1);
                              break;
                           case 63:
                              var1.a(2);
                           }
                        }
                     }
                  }

                  this.a.a();
                  break;
               default:
                  this.a.a();
               }
            }

            return;
         }
      }
   }

   private void i() throws Exception {
      Font var1 = new Font(this.b.b.getWorksheets(), (Object)null, false);
      this.b.g.put(this.f, var1);
      if (this.a.n()) {
         this.a.a();
      } else {
         this.a.d();

         while(zass.a(this.a)) {
            switch(n.a(this.a.p().toLowerCase())) {
            case 12:
               this.a(var1);
               break;
            default:
               this.a.a();
            }
         }

      }
   }

   private void j() throws Exception {
      zaqs var1 = new zaqs();
      zaqt var2 = new zaqt();
      var2.a = var1;
      this.b.h.put(this.f, var2);
      if (this.a.n()) {
         this.a.a();
      } else {
         this.a.d();

         while(zass.a(this.a)) {
            switch(n.a(this.a.p().toLowerCase())) {
            case 12:
               var2.b = new Font(this.b.b.getWorksheets(), (Object)null, false);
               this.a(var2.b);
               break;
            case 54:
               this.a(var1);
               break;
            default:
               this.a.a();
            }
         }

      }
   }

   private void k() throws Exception {
      zaqz var1 = new zaqz();
      zaqs var2 = new zaqs();
      zara var3 = new zara();
      var3.a = var1;
      var3.b = var2;
      if (this.b.i.get(this.f) == null) {
         this.b.i.put(this.f, var3);
      }

      if (this.a.n()) {
         this.a.a();
      } else {
         this.a.d();

         while(zass.a(this.a)) {
            switch(n.a(this.a.p().toLowerCase())) {
            case 54:
               this.a(var2);
               break;
            case 64:
               this.a(var1);
               break;
            default:
               this.a.a();
            }
         }

      }
   }

   private void a(zaqz var1) throws Exception {
      if (this.a.m()) {
         while(true) {
            if (!this.a.l()) {
               this.a.k();
               break;
            }

            switch(n.a(this.a.p().toLowerCase())) {
            case 65:
               var1.a = this.a.s();
               break;
            case 66:
               var1.b = this.a.s();
               break;
            case 67:
               var1.c = this.a.s();
               break;
            case 68:
               var1.d = this.a.s();
               break;
            case 69:
               var1.e = this.a.s();
               break;
            case 70:
               var1.f = this.a.s();
               break;
            case 71:
               var1.g = this.a.s();
               break;
            case 72:
               var1.h = this.a.s();
               break;
            case 73:
               var1.i = zaqh.h(this.a.s());
               break;
            case 74:
               var1.o = com.aspose.cells.a.c.zp.a(this.a.s().substring(0, 0 + (this.a.s().length() - 1))) / 100.0D;
               break;
            case 75:
               var1.j = this.a.s();
               break;
            case 76:
               var1.k = this.a.s();
               break;
            case 77:
               var1.l = this.a.s();
               break;
            case 78:
               var1.m = this.a.s();
               break;
            case 79:
               var1.n = zaqh.h(this.a.s());
               break;
            case 80:
               var1.p = this.a.s();
               break;
            case 81:
               var1.q = this.a.s();
               break;
            case 82:
               var1.r = this.a.s();
            }
         }
      }

      this.a.a();
   }

   private void a(zaqs var1) throws Exception {
      if (this.a.m()) {
         while(true) {
            if (!this.a.l()) {
               this.a.k();
               break;
            }

            switch(n.a(this.a.p().toLowerCase())) {
            case 83:
               switch(n.a(this.a.s())) {
               case 85:
                  if (this.m) {
                     var1.a = 4;
                  } else {
                     var1.a = 7;
                  }
                  continue;
               case 86:
                  var1.a = 8;
                  continue;
               case 87:
                  var1.a = 1;
                  continue;
               case 88:
                  var1.a = 6;
               default:
                  continue;
               }
            case 84:
               var1.b = (int)(zaqh.d(this.b.a, this.a.s()) * 2.54D / 25.415999999999997D);
            }
         }
      }

      this.a.a();
   }

   private void a(Font var1) throws Exception {
      if (this.a.m()) {
         String var2 = null;
         String var3 = null;

         while(this.a.l()) {
            switch(n.a(this.a.p().toLowerCase())) {
            case 30:
               var1.setColor(zaqh.h(this.a.s()));
               break;
            case 89:
               var1.setColor(Color.getEmpty());
               break;
            case 90:
               if (this.b.q.get(this.a.s()) != null) {
                  var1.b((String)this.b.q.get(this.a.s()));
               } else {
                  var1.b(this.a.s());
               }
               break;
            case 91:
               var1.setBold("bold".equals(this.a.s().toLowerCase()));
               break;
            case 92:
               var1.setItalic("italic".equals(this.a.s().toLowerCase()));
               break;
            case 93:
               var1.setStrikeout("solid".equals(this.a.s().toLowerCase()));
               break;
            case 94:
               var1.setDoubleSize(zaqh.d(this.b.a, this.a.s()));
               break;
            case 95:
               var2 = this.a.s();
               break;
            case 96:
               var3 = this.a.s();
               break;
            case 97:
               int var4 = this.a.s().indexOf(32);
               if (var4 != -1 && !this.a.s().equals("0% 100%")) {
                  String[] var5 = com.aspose.cells.b.a.zv.d(this.a.s(), ' ');
                  if (var5.length >= 2) {
                     boolean var6 = var5[0].charAt(0) == '-';
                     if (var6) {
                        var1.setSubscript(true);
                     } else {
                        var1.setSuperscript(true);
                     }
                  }
               }
            }

            if (var2 != null && "solid".equals(var2)) {
               var1.setUnderline(1);
               if ("double".equals(var3)) {
                  var1.setUnderline(2);
               }
            }
         }

         this.a.k();
      }

      this.a.a();
   }

   private void a(Style var1) throws Exception {
      if (this.a.m()) {
         double var2 = 0.0D;
         boolean var4 = false;
         boolean var5 = false;

         while(this.a.l()) {
            switch(n.a(this.a.p().toLowerCase())) {
            case 65:
               var1.setTextWrapped("wrap".equals(this.a.s()));
            case 66:
            case 67:
            case 68:
            case 69:
            case 70:
            case 71:
            case 72:
            case 73:
            case 74:
            case 75:
            case 76:
            case 77:
            case 78:
            case 79:
            case 80:
            case 81:
            case 82:
            case 83:
            case 84:
            case 85:
            case 86:
            case 87:
            case 88:
            case 89:
            case 90:
            case 91:
            case 92:
            case 93:
            case 94:
            case 95:
            case 96:
            case 97:
            default:
               break;
            case 98:
               if ("none".equals(this.a.s())) {
                  if (var1.f()) {
                     var1.getBorders().getByBorderType(1).setLineStyle(0);
                     var1.getBorders().getByBorderType(4).setLineStyle(0);
                     var1.getBorders().getByBorderType(2).setLineStyle(0);
                     var1.getBorders().getByBorderType(8).setLineStyle(0);
                  }
               } else {
                  this.a(var1.getBorders().getByBorderType(1), this.a.s());
                  var1.getBorders().getByBorderType(4).a(var1.getBorders().getByBorderType(1));
                  var1.getBorders().getByBorderType(2).a(var1.getBorders().getByBorderType(1));
                  var1.getBorders().getByBorderType(8).a(var1.getBorders().getByBorderType(1));
               }
               break;
            case 99:
               if (!"none".equals(this.a.s())) {
                  this.a(var1.getBorders().getByBorderType(1), this.a.s());
               } else if (var1.f()) {
                  var1.getBorders().getByBorderType(1).setLineStyle(0);
               }
               break;
            case 100:
               if (!"none".equals(this.a.s())) {
                  this.a(var1.getBorders().getByBorderType(2), this.a.s());
               } else if (var1.f()) {
                  var1.getBorders().getByBorderType(2).setLineStyle(0);
               }
               break;
            case 101:
               if (!"none".equals(this.a.s())) {
                  this.a(var1.getBorders().getByBorderType(4), this.a.s());
               } else if (var1.f()) {
                  var1.getBorders().getByBorderType(4).setLineStyle(0);
               }
               break;
            case 102:
               if (!"none".equals(this.a.s())) {
                  this.a(var1.getBorders().getByBorderType(8), this.a.s());
               } else if (var1.f()) {
                  var1.getBorders().getByBorderType(8).setLineStyle(0);
               }
               break;
            case 103:
               if (!"none".equals(this.a.s())) {
                  this.a(var1.getBorders().getByBorderType(32), this.a.s());
               } else if (var1.f()) {
                  var1.getBorders().getByBorderType(32).setLineStyle(0);
               }
               break;
            case 104:
               if (!"none".equals(this.a.s())) {
                  this.a(var1.getBorders().getByBorderType(16), this.a.s());
               } else if (var1.f()) {
                  var1.getBorders().getByBorderType(16).setLineStyle(0);
               }
               break;
            case 105:
               var4 = true;
               var2 = zaqh.k(this.a.s());
               if (var2 > 90.0D) {
                  var2 -= 360.0D;
               }
               break;
            case 106:
               if ("ttb".equals(this.a.s())) {
                  var5 = true;
               }
               break;
            case 107:
               var1.setShrinkToFit("true".equals(this.a.s()));
               break;
            case 108:
               switch(n.a(this.a.s())) {
               case 87:
               case 115:
               case 116:
                  var1.setVerticalAlignment(1);
                  continue;
               case 112:
                  var1.setVerticalAlignment(9);
                  continue;
               case 113:
               case 114:
                  var1.setVerticalAlignment(0);
               default:
                  continue;
               }
            case 109:
               this.m = "true".equals(this.a.s());
               break;
            case 110:
               if (this.a.s().charAt(0) == '#') {
                  var1.setForegroundColor(zaqh.h(this.a.s()));
                  var1.setPattern(1);
               } else {
                  switch(n.a(this.a.s())) {
                  case 117:
                     var1.setPattern(0);
                  }
               }
               break;
            case 111:
               switch(n.a(this.a.s())) {
               case 118:
               case 119:
                  var1.setFormulaHidden(true);
                  var1.setLocked(true);
                  break;
               case 120:
                  var1.setLocked(false);
                  var1.setFormulaHidden(false);
                  break;
               case 121:
                  var1.setLocked(false);
                  var1.setFormulaHidden(true);
                  break;
               case 122:
                  var1.setLocked(true);
                  var1.setFormulaHidden(false);
               }
            }
         }

         if (var5) {
            var1.setRotationAngle(255);
         } else if (var4) {
            var1.setRotationAngle((int)var2);
         }
      }

      this.a.a();
   }

   private void a(Border var1, String var2) {
      int var3 = var2.indexOf(35);
      String var4;
      if (var3 != -1) {
         var4 = var2.substring(var3);
         var1.setColor(zaqh.h(var4));
         var2 = var2.substring(0, 0 + var3).trim();
      }

      var3 = var2.indexOf(32);
      var4 = var2;
      if (var3 != -1) {
         var4 = var2.substring(var3 + 1).trim();
         var2 = var2.substring(0, 0 + var3);
      }

      switch(n.a(var4)) {
      case 120:
         var1.setLineStyle(0);
         return;
      case 123:
         var1.setLineStyle(6);
         return;
      default:
         var1.setLineStyle(1);
         if (var2 != null && !"".equals(var2)) {
            switch(n.a(var2)) {
            case 124:
               var1.setLineStyle(1);
               break;
            case 125:
               var1.setLineStyle(5);
               break;
            case 126:
               var1.setLineStyle(2);
               break;
            case 127:
               var1.setLineStyle(7);
               break;
            default:
               double var5 = zaqh.d(this.b.a, var2);
               if (var5 <= 0.05D) {
                  var1.setLineStyle(7);
               } else if (var5 <= 1.0D) {
                  var1.setLineStyle(1);
               } else if (var5 <= 2.5D) {
                  var1.setLineStyle(2);
               } else if (var5 <= 4.0D) {
                  var1.setLineStyle(5);
               }
            }
         }

      }
   }
}
